package de.koller.so.render.proto;

import de.koller.oceanFramework.gl.util.ImagePreview;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;

public class LightTrail {

	public static void setLight( BufferedImage bi ) {
//		Graphics2D g = bi.createGraphics();
//		g.setColor( Color.YELLOW );
//		g.fill( new Ellipse2D.Double( 10, 250, 100, 100 ) );
		
		bi.setRGB( 10, 300, 0xffffff00 );
	}
	
	public static void setBorder( BufferedImage bi ) {
		Graphics2D g = bi.createGraphics();
		g.setColor( Color.BLACK );
		g.fill( new Ellipse2D.Double( 300, 280, 40, 40 ) );
	}
	
	public static void calcSzene( BufferedImage szene, BufferedImage light, BufferedImage border ) {
		Graphics2D g = szene.createGraphics();
		g.setColor( Color.BLACK );
		g.fill( new Rectangle2D.Double( -1, -1, szene.getWidth()+2, szene.getHeight()+2 ) );
		
		for( int x = 0; x < szene.getWidth(); x++ )
			for( int y = 0; y < szene.getHeight(); y++ )
				for( int lx = 0; lx < szene.getWidth(); lx++ )
					for( int ly = 0; ly < szene.getHeight(); ly++ ) {
						
					}
			
	}
	
	public static void main( String[] args ) {
		BufferedImage frame = new BufferedImage( 1200, 600, BufferedImage.TYPE_INT_ARGB );
		BufferedImage light = new BufferedImage( 1200, 600, BufferedImage.TYPE_INT_ARGB );
		BufferedImage border = new BufferedImage( 1200, 600, BufferedImage.TYPE_INT_ARGB );
		
		setLight( light );
		setBorder( border );
		calcSzene( frame, light, border );
		
		ImagePreview.showImage( light, 1200, 600 );
		ImagePreview.showImage( border, 1200, 600 );
		ImagePreview.showImage( frame, 1200, 600 );
	}
	
}
